eafb4e8796eae9bdb4904860e6df4aee485da5e0,tests/frontend/org/voltdb/regressionsuites/TestStopNode.java,TestStopNode,testStopNode,#,111

Before Change



        try {
            CountDownLatch cdl = new CountDownLatch(1);
            client.callProcedure(new StopCallBack(cdl, ClientResponse.SUCCESS, 4), "@StopNode", 4);
            cdl.await();
            waitForHostToBeGone(4);
            cdl = new CountDownLatch(1);
            client.callProcedure(new StopCallBack(cdl, ClientResponse.SUCCESS, 3), "@StopNode", 3);
            cdl.await();
            waitForHostToBeGone(3);
            cdl = new CountDownLatch(1);
            client.callProcedure(new StopCallBack(cdl, ClientResponse.SUCCESS, 2), "@StopNode", 2);
            cdl.await();
            waitForHostToBeGone(2);
            client.callProcedure("@SystemInformation", "overview");

After Change


            byte expectedResponse = (kfactor > 0) ? ClientResponse.SUCCESS : ClientResponse.GRACEFUL_FAILURE;
            client.callProcedure(new StopCallBack(cdl, expectedResponse, 4), "@StopNode", 4);
            cdl.await();
            if (expectedResponse == ClientResponse.SUCCESS) {
                waitForHostToBeGone(4);
            }
            cdl = new CountDownLatch(1);
            client.callProcedure(new StopCallBack(cdl, expectedResponse, 3), "@StopNode", 3);
            cdl.await();
            if (expectedResponse == ClientResponse.SUCCESS) {
                waitForHostToBeGone(3);
            }
            cdl = new CountDownLatch(1);
            client.callProcedure(new StopCallBack(cdl, expectedResponse, 2), "@StopNode", 2);
            cdl.await();
            if (expectedResponse == ClientResponse.SUCCESS) {
                waitForHostToBeGone(2);
            }
            client.callProcedure("@SystemInformation", "overview");